<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: xajax.misc.php 135 2013-09-22 07:30:55Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 135 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-22 07:30:55 +0000 (Sun, 22 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

function removeLoader($id = '') {
	$ajax = new xajaxResponse();

	if(!empty($id))
		$ajax->script('$("#'.$id.'").find("#ajax_overlay").fadeOut(350,function(){$(this).remove();});');
	else
		$ajax->script('$("#ajax_overlay").remove()');

	return $ajax;
}

function convertToVars($query_string) {
	$vars = array();
	if (!is_array($query_string)) {
		$arr_vars = explode('&',$query_string);
		foreach ($arr_vars as $value) {
			$arr_vars2 = explode('=',$value);
			$vars[$arr_vars2[0]] = urldecode($arr_vars2[1]);
		}
	} else {
		reset($query_string);
		while (list($key, $value) = each ($query_string)) {
			$vars[$key] = $value;
		}
	}
	return $vars;
}

$xajax->registerFunction("removeLoader");
$xajax->getJavascriptConfig();
?>